package com.xinyu.web.testTX;

import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public class AccountServiceImp implements AccountService {
	
	private AccountDao aDao;
	@Override
	@Transactional(isolation=Isolation.REPEATABLE_READ,propagation=Propagation.REQUIRED,readOnly=false)
	public void transfer(final Integer froms, final Integer tos,final Double money) {
		aDao.increaseMoney(tos, money);
		aDao.decreaseMoney(froms, money);		
	}
	public AccountDao getaDao() {
		return aDao;
	}
	public void setaDao(AccountDao aDao) {
		this.aDao = aDao;
	}
	
	
}
